package com.example.school.controller.user;

import com.example.school.dto.UserCourseListDto;
import com.example.school.service.CourseService;
import com.example.school.utils.common.result.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/user/course")
public class CourseController {

    @Autowired
    private CourseService courseService;

    @GetMapping("/get_user_course_list")
    public Result getUserCourseList(@RequestParam(value = "week",required = false) Integer week,
                                    @RequestParam(value = "semesterId",required = false) Long semesterId){
        return courseService.getUserCourseList(week,semesterId);
    }

}
